﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 教师基础输入参数
    /// </summary>
    public class TeacherBaseInput
    {
        /// <summary>
        /// 序号
        /// </summary>
        public virtual string? Xuhao { get; set; }
        
        /// <summary>
        /// 校内编号
        /// </summary>
        public virtual string? Code { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        public virtual string Name { get; set; }
        
        /// <summary>
        /// 是否在校
        /// </summary>
        public virtual bool IsAtSchool { get; set; }
        
        /// <summary>
        /// 是否在籍
        /// </summary>
        public virtual bool IsAtBook { get; set; }
        
        /// <summary>
        /// 电话
        /// </summary>
        public virtual string? Tel { get; set; }
        
        /// <summary>
        /// 用户名
        /// </summary>
        public virtual string UserName { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 教师分页查询输入参数
    /// </summary>
    public class TeacherInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        public string? Xuhao { get; set; }
        
        /// <summary>
        /// 校内编号
        /// </summary>
        public string? Code { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 是否在校
        /// </summary>
        public bool? IsAtSchool { get; set; }
        
        /// <summary>
        /// 是否在籍
        /// </summary>
        public bool? IsAtBook { get; set; }
        
        /// <summary>
        /// 电话
        /// </summary>
        public string? Tel { get; set; }
        
        /// <summary>
        /// 用户名
        /// </summary>
        public string? UserName { get; set; }
        
    }

    /// <summary>
    /// 教师增加输入参数
    /// </summary>
    public class AddTeacherInput : TeacherBaseInput
    {
        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        public override string Name { get; set; }
        
        /// <summary>
        /// 是否在校
        /// </summary>
        [Required(ErrorMessage = "是否在校不能为空")]
        public override bool IsAtSchool { get; set; }
        
        /// <summary>
        /// 是否在籍
        /// </summary>
        [Required(ErrorMessage = "是否在籍不能为空")]
        public override bool IsAtBook { get; set; }
        
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        public override string UserName { get; set; }
        
    }

    /// <summary>
    /// 教师删除输入参数
    /// </summary>
    public class DeleteTeacherInput : BaseIdInput
    {
    }

    /// <summary>
    /// 教师更新输入参数
    /// </summary>
    public class UpdateTeacherInput : TeacherBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 教师主键查询输入参数
    /// </summary>
    public class QueryByIdTeacherInput : DeleteTeacherInput
    {

    }
